program TSVNMerge;

uses
  SysUtils,
  Forms,
  uUtils in 'uUtils.pas',
  uFormSettings in 'uFormSettings.pas' {FormSetting},
  uConfiguration in 'uConfiguration.pas',
  uMerge in 'uMerge.pas';

var
  conflictFiles:TConflictFiles;

{$R *.res}

begin
  //If there is not enough parameters, then display the configuration form
  if ParamCount < 4 then
  begin
    Application.Initialize;
    Application.Title := 'TortoiseSVN Merge';
    Application.CreateForm(TFormSetting, FormSetting);
  Application.Run;
  end
  else
  begin
    //Else merge conflict files
    with conflictFiles do
    begin
      MyFile := ParamStr(1);
      TheirFile := ParamStr(2);
      BaseFile := ParamStr(3);
      MergedFile := ParamStr(4);
    end;
    ResolveConflict(conflictFiles);
  end;
end.
